package com.lwq.orderservice.controller;

import com.lwq.orderservice.pojo.Order;
import com.lwq.orderservice.pojo.OrderDto;
import com.lwq.orderservice.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: 陆
 * @Date: 2024/01/29/20:06
 * @Description:
 */
@Slf4j
@RestController
@Api(tags ="订单")
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;
    @ApiOperation("通过id查订单")
    @GetMapping("/{id}")
    public OrderDto findOrderMessageById(@PathVariable Long id) {
        OrderDto orderDto = orderService.selectById(id);
        return orderDto;
    }
}
